Generate a emoji: :laugh 🤣
[ ] Turn a Line into a Task: ${Red("/task")}
[ ] SB Feature: linked task: Remember to Link CONFIG & STYLE to SB Basics
Generate a markdown Table: ${Red("/table")}
| Header A | Header B |
|---|---|
| Cell A | Cell B |
Generate a date: ${Red("/today")} 2025-10-08
Transclusion of [SB page](SB page) ~ [local file.md](local file.md) ≈ [local document.pdf](local document.pdf)
, Image: 
test: [Objects that are /queryed OR !\[transcluded\]], better not have widgets like ${Red("expression")} in its name or body, otherwise might break the Table format](https://github.com/silverbulletmd/silverbullet/issues/1638#issuecomment-3416408442):
${Green("Ctrl + L")} - Navigate: Page Picker
${Green("Space")} - Input: Current Folder
Iput: “Page Name”
${Green("Shift + Enter")} - Create (aspiring) Page
follow SB Basics#Create Page alongside Current Folder
\({Green("Ctrl + Enter")} or \){Green("Click")} to enter the (aspiring) page
Rename its Title will automatically update its backlinks
Language/Input Method/声笔飞单 → \({Green("Ctrl + Enter")} → \){Green("Alt + ←")}
#Tag itself is an Object as the index.tag to be indexed.
its name “Tag” looks like a “Key without Value”.
#Tag defines what the Object, e.g. Page/Line, is (about).
it is one of the Object’s Properties (if obj has many Tags).
- Page Object itself implicitly has a #Page (i)tag for indexing.
a #Tag is also a Class with a cluster of Instances = Objects = Rows in Table.
So, Tag = Table
Aggregation for future
- [ ] assign a #Todo tag for every todo,
- then Enter this ↑ Page to Filter all Todos
| Database Term | SilverBullet |
|---|---|
| Table | Tag |
| Row | Object |
| Primary Key | Ref |
${.lua}Example: ${.space-lua} on the ==index== (i.e. in the database)
a Page itself is an Object as well, like #Tag.
it exists in the Table as Row
it too could have some Attributes/Properties,
that is, key-value pairs as front matter.
add Key:Value pairs for Page Object, on the Page's Front Matter
- using another Markup language: Yaml
fields are indexed in
${query[from index.tag "Obj's Tag"](from index.tag "Obj's Tag")}TableObjs are Rows in the Table
Keys are Columns in the first Row
are just names (whose types are all implictly "strings"?)
Values are Columns in >= 2nd Rows
can be numbers, strings, booleans, lists
[CustomAttribute:1️⃣]
${query[from index.tag "SBitself" select {ttest=.CustomAttribute, name="[" .. _.name .. "", emm="basic level", ref=.ref, itags=.itags}]]}
[CustomAttribute:2️⃣] [CustomAttribute2:ddd]
${queryfrom index.tag "header" where CustomAttribute}
Query Objects beyond Page & Header: Item & Task
Hello #like #tana [but:"custom"] [fields:do not belong to tags] the \({Red("/query")} below... better not be in/alongside this item itself... \){queryfrom index.tag "tana"}
[x] Clean the floors [dueDate: 2025-10-16]
[ ] Do the dishes [dueDate: 2025-10-18] all \({Red("/queryed")} objs better not have `\){Red("expression")}` in its name ${queryfrom index.tag "task"}
Task Done State is live updating, but sync editing text is not,
${template.each(queryfrom index.tag "task" where not done, templates.taskItem)}
the
![transclusions]is not “edit one place edit everywhere” as well
the page is tagged with #meta (either at the top or the bottem)
meta Pages in Library/Std is inside SB, thus not disk-visible, editable or Page Picker able. They updates with SB itself.
Logically speaking, the (CONFIG + STYLE) (pages + folders) should be taged with #meta, and put under folder ${Blue("Library/User/")}
rather than taged with #SB_itself, and put under ${Blue("space/")}
\({Green("Ctrl + /")} and input: \){Red("Navigate: meta( Page) Picker")}
${embed.youtube "https://youtu.be/qkLJ3viVq8I?t=1850"}
\({Red("\){embed.youtube 'url'}")} 's inplementation can be found in
${Green("Ctrl + Shift + l")} → search for Library/Std/Widgets/Embed#Implementation
Note that it is a non-local function which defines this widget
Both \({Yellow("local varName = varValue")} and \){Yellow("local function end")} have their scopes confined to the space-lua block in which they are defined.
non-local \({Yellow("varName = varValue")} and \){Yellow("function fn() end")} can be acquired
by subsequent space-lua code blocks following the executed order?
by widgets @ anywhere that call them
table is actually the only data structure in Lua?
\({Yellow("local ok, message = pcall(function() ... end)")} is a Lua way of \){Yellow("try: catch/except")}
generally, it generate some ${Yellow("command.define")} templates, e.g.:
slashCommand.define {
name = "",
run = function()
editor.insertAtCursor("Hello |^| world!", false, true)
end
}
similiar to “Quicker Movements Page switch between Apps”
It seems that all those Apis which can be borrowed to use inside space-lua blocks, can also be directly called inside \({Red("\){...}")}, which is to say: all widgets are global space-lua functions that are called
${Green("Win/CMD + click")} the called function will jump on its definition (across pages)
https://silverbullet.md/Space%20Lua/Lua%20Integrated%20Query hand in my assignment below! ${query[[from index.tag "space-lua" where string.match(.script, "key = \"([^\n]+)\",") select {ref=.ref, key=string.match(_.script, "key = \"([^\n]+)\",")}]]}
#SB_itself